home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / 4dostool / rmd200.zip / RMD.DOC < prev   
Text File  |  1994-02-01  |  20KB  |  535 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                                     R M D
  19.  
  20.                           Safe Directory Tree Deleter
  21.  
  22.                                  version 2.00
  23.  
  24.                             (C) 1994 Richard Schaaf
  25.  
  26.  
  27. RMD V2.00                         2                        1 Feb 94
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.                                 TABLE OF CONTENTS
  37.  
  38.          1. Copyright Stuff and Disclaimer........................ 3
  39.          2. Introduction.......................................... 3
  40.          3. System Requirements................................... 3
  41.          4. Installation.......................................... 3
  42.          5. Usage................................................. 4
  43.               5.1 Syntax.......................................... 4
  44.               5.2 Disabling/Enabling Individual Checks............ 4
  45.               5.3 Optimization.................................... 5
  46.               5.4 Move Up Mode.................................... 5
  47.               5.5 Verbosity Levels................................ 6
  48.               5.6 Help System..................................... 7
  49.               5.7 Environment Variables........................... 7
  50.                    5.7.1 The NO_RMD variable...................... 7
  51.                    5.7.2 The RMD_SW variable...................... 7
  52.          6. Command Line Parsing.................................. 8
  53.          7. Hints/Tips............................................ 8
  54.          8. Author................................................ 9
  55.          9. Planned Enhancements.................................. 9
  56.         10. History...............................................10
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87. RMD V2.00                         2                        1 Feb 94
  88. RMD V2.00                         3                        1 Feb 94
  89.  
  90. 1. Copyright Stuff and Disclaimer
  91. =================================
  92.  
  93. This program is freely distributable provided that all files in
  94. this archive are distributed together. Please keep in mind that the
  95. author is the exclusive copyright holder. You may use this program
  96. as you seem fit but you are not allowed to make modifications to it
  97. without the explicit consent from the author.
  98.  
  99. The author cannot be held responsible for damage (including lost
  100. files) incurred, either direct or indirect, by using the files in this
  101. archive. The author also does not guarantee the program will work
  102. as indicated in this file although every effort has been made to
  103. make sure it does. If you find an instance where it does not work
  104. as documented, please report it to the author at the address stated
  105. in section 8.
  106.  
  107. 2. Introduction
  108. ===============
  109.  
  110. This command recursively removes directory trees. The idea behind
  111. using RMD and not "alias rmd=del /s/x/z" or "alias rmd=del /s/x/y/z"
  112. is that the former always asks for acknowledgment (leading to an
  113. automatic "Y" answer after some time) and the latter never asks anything
  114. (leading to unintended deletes).
  115.  
  116. RMD tries to predict whether the directory it is about to delete is
  117. a directory that the user actually wants to delete. If it thinks the
  118. operation is suspect, it will ask the user for confirmation, otherwise
  119. it will just go ahead and delete it.
  120.  
  121. If you find RMD useful, please send me a postcard at the address in
  122. section 8.
  123.  
  124. IN ANY CASE, SEND ME EMAIL IF YOU CAN. THAT IS THE ONLY WAY YOU WILL
  125. BE KEPT INFORMED ABOUT UPDATES AND GET SWIFT REPLIES TO BUG REPORTS AND
  126. ENHANCEMENT REQUESTS.
  127.  
  128. 3. System Requirements
  129. ======================
  130.  
  131. A PC running DR/PC/MS-DOS 3.3 or higher and 4DOS5.0c or later.
  132.  
  133. 4. Installation
  134. ===============
  135.  
  136. Start "install.btm". This program will guide you through the installation
  137. process.
  138.  
  139. Finally, decide where you would like RMD to put its temporary file. RMD
  140. uses the following algoritm for determining where to put its temporary
  141. file:
  142.     if 4DOSTEMP is set then use it
  143.     else if TEMP is set then use it
  144.     else if TMP is set then use it
  145.     else use the root directory of the boot drive
  146.     end if
  147.  
  148. RMD V2.00                         3                        1 Feb 94
  149. RMD V2.00                         4                        1 Feb 94
  150.  
  151. 5. Usage
  152. ========
  153.  
  154. 5.1 Syntax
  155. ----------
  156. RMD [del flags] [answer flags] [/o<123>] [/u<012>] [/v[v]] [/c] [/h] [/?] dirs
  157. Where : delete flags = flags that are passed to the "del" command
  158.                        (all flags that rmd does not recognize are
  159.                        passed to the del command)
  160.         answer flags = assume yes for certain checks (section 5.2)
  161.         /o1 /o2 /o3  = optimize directories (section 5.3)
  162.         /u0 /u1 /u2  = move up flags (section 5.4)
  163.         /v and /vv   = verbosity level; will give more information
  164.                        (section 5.5)
  165.         /c           = display copyright and version information
  166.         /h and /?    = starts the on-line help system (section 5.6)
  167.         dirs         = one or more directories that should be deleted
  168.  
  169. RMD will warn the user if a directory is suspect, or better:
  170.     - if the directory is not on the current drive, and/or
  171.     - the directory is the root directory of a drive, and/or
  172.     - the directory is "higher" than the current directory, and/or
  173.     - the delete would delete a directory in the NO_RMD variable
  174.       (section 5.7.1)
  175. (This is only true if the check has not been disabled, see section 5.2)
  176.  
  177. If a directory is suspect the user will be asked for confirmation.
  178. At that point the user has the following options:
  179.     Y = Delete this directory
  180.     N = Skip this directory
  181.     A = Always delete (don't check for suspect directories)
  182.     Q = Quit (don't delete anything)
  183.     H = Help
  184.     ! = Shell out to 4DOS (COMSPEC has to be set for this to work)
  185.  
  186. An argument is always skipped if:
  187.     - the argument is on a drive that is not ready
  188.     - the argument does not exist
  189.     - the argument exists but is not a directory
  190.     - the argument is a directory on a CD-ROM
  191.     - the argument is a directory on a network drive (unless overridden with
  192.       /y+w:<drives>)
  193.  
  194. 5.2 Disabling/Enabling Individual Checks
  195. ----------------------------------------
  196.  
  197. Individual checks can be disabled or enabled with the "answer flags".
  198.  
  199. The answer flags disable (/y+) or enable (/y-) individual check for
  200. specific drives. Checks that can be disabled or enabled are:
  201.  
  202.      The different drive check  (type=D)
  203.      The root directory check   (type=R)
  204.      The higher directory check (type=H)
  205.      The NO_RMD check           (type=N)
  206.      The network drive check    (type=W)
  207.  
  208. The complete definition of the answer flags is as follows:
  209. RMD V2.00                         4                        1 Feb 94
  210. RMD V2.00                         5                        1 Feb 94
  211.  
  212. answer flags = [/y+<type>[:drives]] [/y-<type>[:drives]] [/yes] [/fd]
  213. where   /yes = /y+d/y+r/y+h/y+n
  214.         /fd  = /y+d:AB/y+r:AB
  215.  
  216. If no drives are specified, the flag applies to all drives.
  217.  
  218. Example: /y+d/y-d:c       disabled the different drive check unless
  219.                           that other drive is drive C
  220.  
  221. 5.3 Optimization
  222. ----------------
  223.  
  224. There are two kinds of optimization. The first kind (/o1) removes directories
  225. that will be deleted anyway from the list of directories. For example:
  226. "rmd /yes .. ..\q" in "c:\tmp" will be translated to "del /s/x/y/z c:\ c:\q",
  227. but "c:\q" will have been deleted already by the "del /s/x/y/z c:\". If you
  228. specify the "/o1" flag, rmd will execute "del /s/x/y/z c:\"
  229.  
  230. Note that specifying the "/o1" flag does not only reduce the number of
  231. parameters to the "del" command but also prevents some accidental deletes.
  232. Assume there is a file "c:\test\q. Consider "rmd q q" in "c:\". This will
  233. be translated to "del /s/x/y/z q q". The first "q" will delete the directory
  234. "c:\q", as expected and as probably intended. The second "q", however, will
  235. remove all files named "q" on drive C, including "c:\test\q" !!!
  236.  
  237. Now consider "rmd /o1 q q". In this case, RMD will notice that the intended
  238. delete is "del /s/x/y/z q" and not "del /